package lv.solcraft.replication.client.http;

import org.restlet.Client;
import org.restlet.data.Protocol;

public class HttpClientFactory {

    private static final long connectTimeout = 1000 * 60; // 1 min
    private static final long readTimeout = 1000 * 60 * 30; // 30 min

    public static Client get() {
        Client client = new Client(Protocol.HTTP);
        client.getContext().getParameters().add("connectTimeout", Long.toString(connectTimeout));
        client.getContext().getParameters().add("readTimeout", Long.toString(readTimeout));
        return client;
    }
}
